Hi Everyone,
I am using ASP.NET MVC4 and defining a text box using HTML.TextBox html helper class .But i want to know what is difference between “HTML.TextBox” and “HTML.TextBoxFor”. Please give me a solution.
Thank you.
What is the difference between “HTML.TextBox” vs “HTML.TextBoxFor”?
186004-Feb-2016
Updated on 04-Feb-2016
Anupam Mishra
04-Feb-2016Html.TextBox("StudentCode")
Here , “Html.TextBoxFor” code which creates HTML textbox using the property name ‘StudentCode” from object “m”.
Html.TextBoxFor(m => m.StudentCode)